<?php

namespace maotool\core\text\password\rule;

use maotool\core\text\password\PasswdStrengthResult;
use maotool\core\text\password\PasswdStrengthRule;
use maotool\core\text\password\result\PasswdStrengthError;
use maotool\core\text\password\result\PasswdStrengthSuccess;

class BirthdayRule implements PasswdStrengthRule
{

    protected $date;

    protected $message;

    public function __construct($date, $message = "密码不能包含生日")
    {
        $this->date = $date;
        $this->message = $message;
    }

    function handle($password)
    {
        $passwdStrengthSuccess = new PasswdStrengthSuccess();
        $passwdStrengthSuccess->setName("birthday");
        return $passwdStrengthSuccess;
    }


}